package com.dms.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.dms.dao.*;
import com.dms.model.Admin;
@Service
public class AdminService {
	@Resource
	private AdminDao dao;
	
	public Admin checkLogin(String username,String password){
		String hql="from Admin where username='"
			+username+"' and password='"+password+"'";
//		System.out.println("AdminService checkLogin hql"+hql);
		Admin admin=dao.getAdmin(hql);
		return admin;
	}
	
	public void updateAdmin(Admin admin){
		dao.updateAdmin(admin);
	}
}
